package exercise.test.test_03;

import java.util.Scanner;

public class Src_1 {

    public static void main(String[] args) {
        double f=0;
        long n,i=0;
        int lim;
        Scanner sc=new Scanner(System.in);
        System.out.println("Please Enter Limit>>");
        lim=sc.nextInt();
        while(f<lim){
            i++;
            f=f+1.0/i;
            if(i%1000==0)
                System.out.println("Num>> "+i+"\tValue>>"+f);
        }
        n=i;
        System.out.println("Smallest n="+n);
        System.out.println("f="+f);
    }
}
